Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEW] Add tags to uploaded images using Google Cloud Vision API #6301

Merged
merged 22 commits into from
Aug 22, 2017

Conversation

marceloschmidt
Copy link
Member

@RocketChat/core

Closes #6019

image

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6301 March 8, 2017 22:56 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6301 March 9, 2017 21:25 Inactive
@lucasvanhalst
Copy link
Contributor

That's neat, will those tags be searchable?

@marceloschmidt
Copy link
Member Author

Yes that's in our plans.

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-6301 March 10, 2017 20:41 Inactive
@marceloschmidt marceloschmidt changed the title [WIP] Google vision Google vision Mar 10, 2017
@engelgabriel engelgabriel added this to the Google Cloud Next 17 milestone Mar 10, 2017
@engelgabriel engelgabriel modified the milestones: 0.56.0, Google Cloud Next 17 Apr 27, 2017
# Conflicts:
#	packages/rocketchat-lib/lib/callbacks.coffee
@marceloschmidt
Copy link
Member Author

@RocketChat/core conflicts have been solved. Can I have some eyes on this?

@engelgabriel engelgabriel modified the milestones: 0.56.0, 0.57.0 May 9, 2017
@sampaiodiego sampaiodiego changed the title Google vision [NEW] Add tags to uploaded images using Google Cloud Vision API May 11, 2017
@engelgabriel engelgabriel modified the milestones: 0.57.0, 0.58.0 Jun 19, 2017
marceloschmidt and others added 2 commits July 21, 2017 10:49
# Conflicts:
#	.meteor/versions
#	packages/rocketchat-lib/server/functions/sendMessage.coffee
#	packages/rocketchat-lib/server/functions/settings.coffee
const file = RocketChat.models.Uploads.findOne({ _id: message.file._id });
if (file && file.type && file.type.indexOf('image') !== -1 && file.store === 'GoogleCloudStorage:Uploads' && file.googleCloudStorage) {
if (this.incCallCount(1)) {
const bucket = this.storageClient.bucket(file.googleCloudStorage.bucket);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't store bucket name on the file anymore.

if (file && file.type && file.type.indexOf('image') !== -1 && file.store === 'GoogleCloudStorage:Uploads' && file.googleCloudStorage) {
if (this.incCallCount(1)) {
const bucket = this.storageClient.bucket(file.googleCloudStorage.bucket);
const bucketFile = bucket.file(`${ file.googleCloudStorage.path }${ file._id }`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the file path property changed as well

blockUnsafeImages(message) {
if (this.enabled && this.serviceAccount && message && message.file && message.file._id) {
const file = RocketChat.models.Uploads.findOne({ _id: message.file._id });
if (file && file.type && file.type.indexOf('image') !== -1 && file.store === 'GoogleCloudStorage:Uploads' && file.googleCloudStorage) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't have the file.googleCloudStorage property anymore.

@rodrigok rodrigok modified the milestones: 0.58.0, 0.59.0 Aug 1, 2017
# Conflicts:
#	packages/rocketchat-lib/server/functions/sendMessage.js
#	packages/rocketchat-theme/client/imports/general/base_old.css
@rodrigok
Copy link
Member

@marceloschmidt Can you test it again?

@rodrigok rodrigok merged commit 6151864 into develop Aug 22, 2017
@rodrigok rodrigok deleted the google-vision branch August 22, 2017 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration with Google Cloud Vision API
6 participants